package com.doubao.notepad_blog_backend.controller;

import com.doubao.notepad_blog_backend.common.api.ApiResult;
import com.doubao.notepad_blog_backend.domain.BmsPromotion;
import com.doubao.notepad_blog_backend.service.BmsPromotionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/promotion")
@Api(value = "推广信息",tags = {"推广信息"})
public class BmsPromotionController {
    @Resource
    private BmsPromotionService promotionService;

    @ApiOperation( "所有推广" )
    @GetMapping("/list")
    public ApiResult getPromotionList(){
        List<BmsPromotion> list = promotionService.list();
        return ApiResult.success(list);
    }

}
